home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-02-21 | 6.5 KB | 211 lines | [TEXT/MPS ] |
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
- #ifndef __STANDARDFILE__
- #include <StandardFile.h>
- #endif
-
- /************** AEchess.c **************/
-
- void InitCustomAppleEvents(void);
- pascal OSErr DoAEAnswer(AppleEvent *message, AppleEvent *reply, long refcon);
- OSErr SendGame(FileRecHndl frHndl, short sendReason);
- pascal OSErr ReceiveGameReply(AppleEvent *message, AppleEvent *reply);
- pascal OSErr ReceiveGame(AppleEvent *message, AppleEvent *reply, long refcon);
- Boolean SendMssg(FileRecHndl frHndl, short messageType);
- pascal OSErr ReceiveMssg(AppleEvent *message, AppleEvent *reply, long refcon);
- WindowPtr GetGameWindow(long gameID_0, long gameID_1);
- pascal Boolean KibitzPortFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
- pascal Boolean MyIdleProc(EventRecord *event, long *sleep, RgnHandle *mouseRgn);
- void NotifyCancel(void);
- void NotifyUser(void);
- void SetOpponentType(FileRecHndl frHndl, short newOpponentType);
-
-
-
- /************** AppleEvents.c **************/
-
- void DoHighLevelEvent(EventRecord *event);
- OSErr GetTargetInfo(AEAddressDesc targetDesc, StringPtr zone, StringPtr machine, StringPtr application);
- void InitAppleEvents(void);
- OSErr MakeTarget(AEAddressDesc *target, Boolean sendDirect, short replyMode, Str255 prompt, Str255 applListLabel,PPCFilterProcPtr portFilter);
- Boolean MissedAnyParameters(AppleEvent *message);
- pascal OSErr DoAEOpenApplication(AppleEvent *message, AppleEvent *reply, long refcon);
- pascal OSErr DoAEOpenDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
- pascal OSErr DoAEPrintDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
- pascal OSErr DoAEQuitApplication(AppleEvent *message, AppleEvent *reply, long refcon);
- OSErr OpenDocEventHandler(AppleEvent *message, AppleEvent *reply, short mode);
-
-
-
- /************** BoardSlider.c **************/
-
- void AdjustGameSlider(FileRecHndl frHndl);
- ControlHandle BoardSliderNew(WindowPtr window);
- Boolean RepositionBoard(FileRecHndl frHndl, short newPos, Boolean update);
-
-
-
- /************** Chess.c **************/
-
- void AddLegalMove(FileRecHndl game, short from, short to);
- Boolean CastleOkay(FileRecHndl game, short castleSide);
- void EndTheGame(FileRecHndl frHndl, short endReason);
- short GameStatus(FileRecHndl game);
- void GenerateLegalMoves(FileRecHndl game);
- void MakeMove(FileRecHndl game, short moveFrom,short moveTo,
- short promoteTo, Boolean modifyGame);
- void NewGame(FileRecHndl game);
- short SquareAttacked(FileRecHndl game, short square, short color);
- void UnmakeMove(FileRecHndl game);
- short UpdateTime(FileRecHndl game, Boolean canLose);
- short WhosMove(FileRecHndl game);
-
- Boolean ComputerMove(FileRecHndl game);
- void UpdateGameStatus(FileRecHndl game);
- void DrawButtonTitle(FileRecHndl game, short newVal);
- short CheckForMate(FileRecHndl game, short nodeDepth, short maxDepth);
- long OneDeepEval(FileRecHndl game, short from, short to, short color);
- short BestMove(FileRecHndl game, short nodeDepth, short maxDepth);
-
-
-
- /************** Config.c **************/
-
- void DoConfigureGame(FileRecHndl frHndl);
- pascal Boolean configFilter(DialogPtr dlg, EventRecord *event, short *item);
-
-
-
- /************** DoCursor.c **************/
-
- void DoCursor(Boolean isAppleEvent, long classID);
- void DoSetCursor(Cursor *cursor);
- Rect BoardRect(void);
- Rect GlobalBoardRect(WindowPtr window);
-
-
-
- /************** DoEvent.c **************/
-
- short AlertIfGameOver(FileRecHndl frHndl);
- void DoActivate(WindowPtr window, Boolean becomingActive);
- void DoContentClick(WindowPtr window, EventRecord *event);
- void DoEvent(EventRecord *event);
- void DoUpdate(WindowPtr window);
-
-
-
- /************** EventLoop.c **************/
-
- void EventLoop(void);
-
-
-
- /************** File.c **************/
-
- OSErr AppDisposeDocument(FileRecHndl frHndl);
- Boolean AppDocumentDirty(FileRecHndl frHndl);
- OSErr AppNewDocument(FileRecHndl *returnHndl);
- OSErr AppOpenDocument(FileRecHndl *result, FSSpecPtr fileToOpen, char permission);
- OSErr AppSaveDocument(FileRecHndl frHndl, WindowPtr window, short saveMode);
- void ConvertOldToNewSFReply(SFReply *oldReply, StandardFileReply *newReply);
- OSErr Create_OpenFile(FSSpec *file, short *refNum);
- Boolean DisplayGetFile(StandardFileReply *reply);
- Boolean DisplayPutFile(StandardFileReply *reply);
- void IncNewFileNum(Boolean flag);
-
- OSErr AppReadDocument(FileRecHndl frHndl);
- OSErr AppWriteDocument(FileRecHndl frHndl);
- OSErr AppDuplicateDocument(FileRecHndl oldFrHndl, FileRecHndl *newFrHndl);
-
-
-
- /************** Help.c **************/
-
- void DynamicBalloonHelp(void);
-
-
-
- /************** IdleTasks.c **************/
-
- void DoIdleTasks(Boolean allowComputerMoves);
-
-
-
- /************** Init.c **************/
-
- void Initialize(void);
- void StartDocuments(void);
-
-
- /************** KibitzWindow.c **************/
-
- Boolean Algebraic(FileRecHndl frHndl, short printMoveNum, short gameIndex, StringPtr pstr);
- OSErr AppNewWindowControls(FileRecHndl frHndl, WindowPtr window);
- void DrawTime(FileRecHndl frHndl);
- void ImageBoardLines(short hOffset, short vOffset);
- void ImageDocument(FileRecHndl frHndl, Boolean justBoard);
- void ImageMoveList(FileRecHndl frHndl, Rect theInk, short hOffset);
-
-
- /************** Menu.c **************/
-
- void AdjustMenus(void);
- void DoMenuCommand(long menuResult);
- void EnableOrDisableItem(MenuHandle menu, short item, Boolean enable);
-
-
-
- /************** Print.c **************/
-
- OSErr AppPrintDocument(FileRecHndl frHndl, Boolean jobDlg, Boolean firstJob);
- OSErr PresentStyleDialog(FileRecHndl frHndl);
-
-
-
- /************** Setup.c **************/
-
- void DoArrangeBoard(FileRecHndl frHndl, Point clickLoc);
- void DrawPalette(FileRecHndl frHndl);
- Rect PaletteRect(void);
-
-
-
- /************** Sound.c **************/
-
- OSErr RecordSound(FileRecHndl frHndl);
- Boolean SoundInputAvaliable(void);
-
-
-
- /************** Start.c **************/
-
- void main(void);
-
-
-
- /************** Utils.c **************/
-
- void appendi2cstr(char *cstr, short i);
- short appendi2pstr(char *pstr, short i);
- short i2cstr(char *cstr, short i);
- void i2pstr(char *pstr, short i);
- pascal Boolean keyEquivFilter(DialogPtr dlg, EventRecord *event, short *item);
- void pstrcat(char *d, char *s);
- void pstrcpy(char *d, char *s);
- void OffsetControl(ControlHandle ctl, short dx, short dy);
-
-
- /************** Window.c **************/
-
- OSErr AppNewWindow(FileRecHndl frHndl, WindowPtr *retWindow);
- void AppNewWindowTitle(WindowPtr window);
- Boolean AppWindowDirty(WindowPtr window);
- Boolean CloseAllWindows(void);
- Boolean CloseOneWindow(WindowPtr window, short saveMode);
- WindowPtr SetFilePort(FileRecHndl frHndl);
-
-
-